
# text = '%s,我已经下载了90%'%'兄弟'    报错了
# text = '%s,我已经下载了90\%'%'兄弟'   报错了
# 一旦格式化字符串中出现了百分比显示，要用两个百分号
text = '%s,我已经下载了90%%'%'兄弟'
print(text)
msg = '我叫%(name)s,你什么时候过来啊'%{'name':'aqdsd'}
print(msg)
text = '我是%s,今年%d岁'
data1 = text.format('aaa',18)
data2 = text%('vvv',23)
print(data1)
print(data2)

text = '我是{name},今年{age}岁'.format(name='asas',age=18)
print(text)

# f格式化，python3.6之后有的
text = f"嫂子喜欢{'跑步'}"
action = '跑步'
text = f'嫂子喜欢{action}'
print(text)
name = 'abgc'
age = 23
text = f'嫂子叫{name},今年{age}'
print(text)



data = '我'
print(data.center(30,'*'))
print(data.zfill(20))

# num = '①'
num = '1'
print(num.isdecimal())  # 判断是否是数字，应该用这个
print(num.isdigit())    #




